import {ReactNode} from 'react';

export interface IOrderInfo {
  address: string;
  contactName: string;
  createdAt: string;
  createdBy: string;
  customerName: string;
  customNumber: string;
  deliveryName: string;
  deliveryPhone: string;
  deliveryTime: string;
  deliveryTimeLabel: string;
  deposit: number;
  facilityId: string;
  facilityName: string;
  id: string;
  invoiceRequired: string;
  productPaidAmount: number;
  finalAmount: number;
  isDeleted: string;
  note: string;
  orderStatus: string;
  orderTime: string;
  paidAmount: number;
  paidStatus: string;
  paidStatusLabel: string;
  payMethod: string;
  payMethodLabel: string;
  paidTime: string;
  phone: string;
  settlementType: string;
  settlementTypeLabel: string;
  source: string;
  totalAmount: number;
  title: string;
  updatedAt?: string;
  updatedBy?: string;
  version?: number;
}

export interface IOrderDetail {
  actualNum: number;
  actualPrice: number;
  brand: string;
  gouTongNumber: number;
  huiTongNumber: number;
  id?: string;
  modelType: string;
  needReturn: string;
  number: number;
  orderId?: string;
  payablePrice: number;
  productId: string;
  productName: string;
  returnCash: number;
  status: string;
  tongPrice: number;
  totalPrice: number;
  unitPrice: number;
}

export type OrderDetailViewProps = {
  children: ReactNode;
  onFetchOrder: () => Promise<{
    orderInfo: IOrderInfo;
    orderDetails: IOrderDetail[];
  } | boolean>;
};
